home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
raytrace
/
pov
/
gen
/
aatexe
/
readme
< prev
next >
Wrap
Text File
|
1993-07-21
|
6KB
|
136 lines
/* Another Animation Tool
Created by Jeff Epler
This program is a middle-man, creating files suitable for use by
RAYSCENE. With the commands available to you, creation of animation
will be easier than the use of the RANGE command that was a part of
RAYSCENE. Just create a data file like in simple.aat and pipe it
to aat. Stdout will contain a file suitable to be a rayscene
array.
You are free to use and improve this program. If you make any
signifigant revisions to it, please drop me a line...
internet address jepler@nyx.cs.du.edu
version 0.1 07-10-93 Very limited control, linear movement only
version 0.2 07-14-93 Added other types of motion, RANDOM option,
changed format to add more flexibility.
First version released on the Internet.
version 0.3 07-15-93 Fixed some silly booboos (RANDOM didn't work,
the name of the program was wrong in the output
file.) and updated README to list info about
platforms it's been compiled on. I'll now say
that I'm confident it'll compile on most any ANSI-C
compiler.
Added SIN-type motion
Added frame-omission and frame-addition options
To emit only one frame of every F, invoke AAT:
aat -oF [...]
To increase the number of frames by a factor of F,
invoke AAT:
aat -mF [...]
If the -o option is used, the last frame is always
output. The -o and -m options cannot be used
together.
A note to TurboC users: Due to the braindead-ness
of DOS, the 80x86 architecture, Borland compilers,
memory models, and anything Intel related, you'll
need to decrease the max_frames or max_variables
constants to make this compile. As packaged, the
array 'double variables[][]' is bigger than the
64K limit on structures. Get GCC or another decent
32-bit compiler and stop worrying about it!
aversion 1.0 07/22/93 A new note to TurboC users: I wrote workaround code
for the variables[] array -- Now it's allocated at
runtime, and can exceed 64K. The upper limit on
frames is probably about 64k/sizeof(double) right
now. You should compile with the large model (MAKE
should do this for you, however.)
Very nearly a complete substitute for Rayscene now
-- Using a style very much like Rayscene, one can
generate many .POV/... files with just AAT.
That's what the 1.0 means.
Command-line is changed:
aat -mX -oX -bNAME -oNAME AAT-NAME
The switch letters are not case sensitive.
-m and -o specify to Multiply or Omit frames.
(X is an integer.) -b specifies the base name
for the output files. -o specifies the name of
the original file. AAT-NAME is the name of your
.aat file. All have reasonable defaults. -m
and -o both default to 1, -b to aat, -o to
aat.pov, and aat-name to aat.aat.
The only feature really lacking in this program
vs. rayscene is script generation. However, I
feel that this is trivial -- With a decent UNIX
shell script or (for DOS) a relatively simple
alias/batch under 4DOS can do it. A batch for
4DOS to render all .POV files in a directory is
now included in the distribution.
Input file structure:
VARIABLES: // Two slashes comment rest of line.
<variable-name>=<double> // No spaces here
[ ... ]
FRAME [integer] // Whitespace where shown here.
// Tabs, spaces, returns are all whitespace.
[ FRAMES <integer> ]
[ <variable-name> TO <double> [ MODE <integer> ] [ FRAMES <integer> ] ]
[ <variable-name> RANDOM <double> <double> [ FRAMES <integer> ] ]
[ <variable-name> SIN <double> <double> <double> <double> [ FRAMES <integer> ] ]
[ ... ]
END
The following modes are supported:
1. Simple linear motion
2. Acceleration X**2
3. Deceleration 2*X - X**2
4. Start & Stop -- Starts as #2, ends as #3
*/
This version (1.0) of AAT is a complete replacement for Rayscene. With one
program, you can now process .aat scripts and output files for your
renderer. (As shipped, AAT works perfectly with POV 1.0 -- For other
renderers, some of the options will need to be changed. This will probably
require source modifications.)
To see AAT in action, just type:
aat simple.aat -osimple.pov
This will read the script simple.aat and the POV file simple.pov. It
should produce 25 frames named aat0001.pov .. aat0025.pov.
Now, you must have POV render all 25 frames, and then use some other tool
to make the separate frames into an animation. (Unlike Rayscene, AAT
doesn't generate a script for you. It's my opinion that it's easy enough
to write a shell script for a UNIX shell or the DOS shell 4DOS that this
wasn't on my priority list.) When you're done, you'll be treated to a very
simple show: Above a rotating checker plane, a sphere changes size and
colour.
See the file aatlang.doc for details about AAT files and how to insert
variables in your data-files. (If you're familiar with Rayscene, you
should be able to write data-files immediately. $ is used for the
variable-signal character, and a variable-name is terminated with either
whitespace or another $ symbol. The only difference you should worry about
is that AAT does _not_ allow whitespace in variable names.)